package com.xx.springboot.DataStructure.LeetCode.LinkedList;

/**
 * Created by xiaoxiunique on 2018-10-25.
 */
public class swapPairs   {
    public ListNode swapPairs(ListNode head) {

        if(head == null || head.next == null)
            return head;

        ListNode l = new ListNode(-1);
        l.next = head;
        ListNode r = new ListNode(-1);
        r.next = head;

        while(r.next != null) {
            l = l.next;
            if(r.next.next != null) {
               ListNode temp = r.next.next;


            }
        }
        return r;
    }

    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4};
        ListNode node = new ListNode(arr);

        (new swapPairs()).swapPairs(node);
    }
}
